﻿<Window x:Class="Turbine.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525"  Background="Transparent" WindowStyle="None" AllowsTransparency="True" MouseDown="Window_MouseDown" Topmost="True">
    <Canvas Name="mainCanvas">
        <Canvas.RenderTransform>
            <RotateTransform Angle="0" CenterX="224" CenterY="130"></RotateTransform>
        </Canvas.RenderTransform>
        <Canvas.Triggers>
            <EventTrigger RoutedEvent="Canvas.Loaded">

                <BeginStoryboard>
                    <Storyboard>

                        <!-- This animation animates the Rotation property of the RotateTransform
                       causing the 3D shape to rotate and wobble as the rotation angle and 
                       axis are animated. -->
                        <DoubleAnimation From="0" To="360" Duration="00:00:0.4"
            AutoReverse="False" 
            RepeatBehavior="Forever" 
                                             Storyboard.TargetName="mainCanvas"
            Storyboard.TargetProperty="(RenderTransform).(RotateTransform.Angle)" >

                        </DoubleAnimation>

                    </Storyboard>

                </BeginStoryboard>
            </EventTrigger>

        </Canvas.Triggers>

        <Rectangle Width="127" Height="30" Fill="Red" Canvas.Left="224" Canvas.Top="129" RadiusX="15" RadiusY="15">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="0"></RotateTransform>
            </Rectangle.RenderTransform>
        </Rectangle>


        <Rectangle Width="127" Height="30" Fill="Yellow" Canvas.Left="224" Canvas.Top="129" RadiusX="15" RadiusY="15">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="45"></RotateTransform>
            </Rectangle.RenderTransform>
        </Rectangle>

        <Rectangle Width="127" Height="30" Fill="Pink" Canvas.Left="224" Canvas.Top="129" RadiusX="15" RadiusY="15">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="90"></RotateTransform>
            </Rectangle.RenderTransform>
        </Rectangle>

        <Rectangle Width="127" Height="30" Fill="Blue" Canvas.Left="224" Canvas.Top="129" RadiusX="15" RadiusY="15">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="135"></RotateTransform>
            </Rectangle.RenderTransform>
        </Rectangle>

        <Rectangle Width="127" Height="30" Fill="Green" Canvas.Left="224" Canvas.Top="129" RadiusX="15" RadiusY="15">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="180"></RotateTransform>
            </Rectangle.RenderTransform>
        </Rectangle>

        <Rectangle Width="127" Height="30" Fill="Orange" Canvas.Left="224" Canvas.Top="129" RadiusX="15" RadiusY="15">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="225"></RotateTransform>
            </Rectangle.RenderTransform>
        </Rectangle>

        <Rectangle Width="127" Height="30" Fill="Peru" Canvas.Left="224" Canvas.Top="129" RadiusX="15" RadiusY="15">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="270"></RotateTransform>
            </Rectangle.RenderTransform>
        </Rectangle>

        <Rectangle Width="127" Height="30" Fill="SpringGreen" Canvas.Left="224" Canvas.Top="129" RadiusX="15" RadiusY="15">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="315"></RotateTransform>
            </Rectangle.RenderTransform>
        </Rectangle>
        <Ellipse Canvas.Left="221" Canvas.Top="126" Fill="Red" Height="5" Width="5" />
    </Canvas>
</Window>
